package stiletto.controller;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;
import stiletto.user.domain.User;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created with IntelliJ IDEA.
 * User: ryudaewan
 * Date: 13. 9. 15
 * Time: 오전 11:43
 * To change this template use File | Settings | File Templates.
 */
public class SpringMVCController extends AbstractController {
  @Override
  protected ModelAndView handleRequestInternal(HttpServletRequest httpServletRequest,
                                               HttpServletResponse httpServletResponse) throws ServletException {
    ModelAndView mview = new ModelAndView("springWebMVC");
    mview.addObject("greeting", "Greetings from Spring Web MVC");
    mview.addObject("member1", new User("ryudaewan@gmail.com", "ryudaewan", "xxx", true));

    return mview;
  }
}
